{% extends 'profileapp/profile/base_index_blog.html' %}

{% load static %}
{% block content %}
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="register-container d-flex justify-content-center align-items-center">
        <div class="register-box p-4 rounded">
            <h2 class="mb-4">Авторизация</h2>
            {% if messages %}
              <div class="alert alert-danger">
                  {% for message in messages %}
                      {{ message }}
                  {% endfor %}
              </div>
              {% endif %}
            <form method="POST" action="{% url 'profile:login' %}">
            {% csrf_token %}

                {{ form.username.label_tag }}
                {{ form.username }}
                {{ form.password.label_tag }}
                {{ form.password }}

                <input class="btn btn-success" type="submit" value="Login">
            </form>
            <a href="{% url 'password_reset' %}" class="btn btn-primary">Восстановление по электронной почте</a>
            <a href="{% url 'profile:register' %}" class="btn btn-success">Регистрация</a>
        </div>
    </div>
{% endblock %}